#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int d[110];
int sum[110];
int main() {
  int n;
  cin >> n;

  for (int i = 1; i <= n - 1; i++) {
    cin >> d[i];
    sum[i] = sum[i - 1] + d[i];
  }
  for (int i = 1; i < n; i++) {
    for (int j = i; j < n; j++) {
      cout << sum[j] - sum[i - 1] << " ";
    }
    cout << endl;
  }
  return 0;
}